// 写分类页面发送的请求
import request from "../untils/request";

export const banner =()=>{
	return request("/api/front/user/spread/banner",{page:1})
}

/*
 * 推广数据 佣金排行
 * */
export const comm =()=>{
  return request("/api/front/brokerage_rank?page=1&limit=20&type=week");
}

/**
 * 
 * 推广订单
 * @param object data
*/
	export const spreads =()=>{
		return request('/api/front/spread/order',{limit:10,page:1})
	}
	
	/**
	 * 
	 * 推广用佣金 提现总额
	 * 
	*/	
	export const counts =(type)=>{
		return request(`/api/front/spread/count/${type}`)
	}
	/* 佣金明细 */
	export const detaec =()=>{
		return request('/api/front/spread/commission/detail?page=1&limit=10')
	}
	/* 
	 昨日收益 累计提现 当前佣金
	 */
	export const commiss=()=>{
		return request('/api/front/commission')
	}
	
	export const banck=()=>{
		return request('/api/front/extract/bank')
	}
	
	
	/*优惠卷
	 */
	export const coupon =()=>{
		return request("/api/front/coupon/list?page=1&limit=20&type=usable")
	}
	
	/*已使用优惠卷
	 */
	export const coupons =()=>{
		return request("/api/front/coupon/list?page=1&limit=20&type=unusable")
	}
	
	/*推广人统计
	 */
	export const pepole =()=>{
		return request("/api/front/spread/people/count")
	}
	
	/*获取地址
	 */
	export const stec =()=>{
		return request("/api/front/address/default/set")
	}
	
	/*获取默认地址
	 */
	export const edits =()=>{
		return request("/api/front/address/edit")
	}